/********************************************
 * Node Class
 */

 function Line(node)
 {
 	this.startPos = new Point(node.position.X + node.width / 2, 
 								node.position.Y + 100);
 	this.endPos = new Point(node.position.X + node.width / 2,
 								 node.position.Y + 500);		
 								 
 	this.vLength = this.endPos.Y - this.startPos.Y;
 	
 	this.points = new Array();
 	this.crossPoints = new Array();
 }
 
 Line.prototype.DrawVLine = function()
 {	
 	context1.beginPath();	
 	context1.moveTo(this.startPos.X, this.startPos.Y);
	context1.lineTo(this.endPos.X, this.endPos.Y);
	context1.lineWidth = 5;

	context1.stroke();
 }
 
 Line.prototype.DrawHLine = function(start, end)
 {	
 	context1.beginPath();
 	context1.moveTo(start.X, start.Y);
 	context1.lineTo(end.X, end.Y);
 	context1.lineWidth = 1;
 	context1.stroke();
 }

 
 Line.prototype.CreateCrossPoints = function()
 {
 	for(var i = 0; i < 10; i++)
 	{
 		this.crossPoints[i] = new CrossPoint(this.startPos.X,
 												this.startPos.Y + 20 + this.vLength / 10 * i,
 												i);
 		context1.beginPath();		
		context1.arc(this.crossPoints[i].pos.X, this.crossPoints[i].pos.Y, 5, 2 * Math.PI, false);
	 
		context1.fillStyle="#8ED6FF";
		context1.fill();
		context1.lineWidth=2;
		context1.strokeStyle="black"; 
		context1.stroke();
 	}
 	
 }
 
 Line.prototype.DrawTrace = function()
 {
 		
 }
 